﻿<%@ Page Title="" Language="vb" AutoEventWireup="false" MasterPageFile="~/Site.Master" CodeBehind="Profile.aspx.vb" Inherits="Nokia_Smartphones.Profile" %>
<asp:Content ID="Content1" ContentPlaceHolderID="HeadContent" runat="server">
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="MainContent" runat="server">
    <p>
        <asp:GridView ID="GridView1" runat="server" AutoGenerateColumns="False" 
            DataSourceID="SqlDataSource1" BackColor="White" BorderColor="#999999" 
            BorderStyle="None" BorderWidth="1px" CellPadding="3" GridLines="Vertical">
            <AlternatingRowStyle BackColor="#DCDCDC" />
            <Columns>
                <asp:BoundField DataField="First_Name" HeaderText="First Name" 
                    SortExpression="First_Name" />
                <asp:BoundField DataField="Mobile_Interest" HeaderText="Mobile Interest" 
                    SortExpression="Mobile_Interest" />
                <asp:BoundField DataField="Picture" HeaderText="Picture" 
                    SortExpression="Picture" />
                <asp:BoundField DataField="Description" HeaderText="Description" 
                    SortExpression="Description" />
                <asp:BoundField DataField="Gender" HeaderText="Gender" 
                    SortExpression="Gender" />
                <asp:BoundField DataField="DOB" HeaderText="DOB" SortExpression="DOB" />
                <asp:BoundField DataField="Last_Name" HeaderText="Last Name" 
                    SortExpression="Last_Name" />
                <asp:BoundField DataField="Address1" HeaderText="Address1" 
                    SortExpression="Address1" />
                <asp:ImageField DataImageUrlField="Picture" HeaderText="Image">
                </asp:ImageField>
                <asp:HyperLinkField DataNavigateUrlFields="Post_Code" 
                    DataNavigateUrlFormatString="http://maps.google.co.uk/?q={0}" 
                    DataTextField="Post_Code" HeaderText="Post Code" />
                <asp:HyperLinkField DataNavigateUrlFields="Facebook" 
                    DataNavigateUrlFormatString="http://www.facebook.com/{0}" 
                    DataTextField="Facebook" HeaderText="Facebook" />
            </Columns>
            <FooterStyle BackColor="#CCCCCC" ForeColor="Black" />
            <HeaderStyle BackColor="#000084" Font-Bold="True" ForeColor="White" />
            <PagerStyle BackColor="#999999" ForeColor="Black" HorizontalAlign="Center" />
            <RowStyle BackColor="#EEEEEE" ForeColor="Black" />
            <SelectedRowStyle BackColor="#008A8C" Font-Bold="True" ForeColor="White" />
            <SortedAscendingCellStyle BackColor="#F1F1F1" />
            <SortedAscendingHeaderStyle BackColor="#0000A9" />
            <SortedDescendingCellStyle BackColor="#CAC9C9" />
            <SortedDescendingHeaderStyle BackColor="#000065" />
        </asp:GridView>
        <asp:SqlDataSource ID="SqlDataSource1" runat="server" 
            ConnectionString="<%$ ConnectionStrings:PhonesConn %>" 
            ProviderName="<%$ ConnectionStrings:PhonesConn.ProviderName %>" 
            
            SelectCommand="SELECT Profile.First_Name, Profile.Mobile_Interest, Profile.Picture, Profile.Description, Profile.Gender, Profile.DOB, Profile.Last_Name, Profile.User_Name, Profile.Facebook, Profile.Address1, Profile.Post_Code, Profile.Title FROM (Profile INNER JOIN aspnet_Users ON Profile.User_Name = aspnet_Users.UserName) WHERE (Profile.User_Name = ?)">
            <SelectParameters>
                <asp:QueryStringParameter Name="User_Name" QueryStringField="UserName" 
                    Type="String" DefaultValue="" />
            </SelectParameters>
        </asp:SqlDataSource>
        <br />
    </p>
    <p>
        <asp:Button ID="btn_Edit" runat="server" PostBackUrl="~/EditProfile.aspx" 
            Text="Edit Profile" />
    </p>
    <p>
    </p>
</asp:Content>
